////////////////////////////////////////////////////////////////////////////////////////////////////
/// Copyright (c) 2009 - 2010 RacoonStudios
///
/// Permission is hereby granted, free of charge, to any person obtaining a copy of this
/// software and associated documentation files (the "Software"), to deal in the Software
/// without restriction, including without limitation the rights to use, copy, modify, merge,
/// publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons
/// to whom the Software is furnished to do so, subject to the following conditions:
///
/// The above copyright notice and this permission notice shall be included in all copies or
/// substantial portions of the Software.
///
/// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED,
/// INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR
/// PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE
/// FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR
/// OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
/// DEALINGS IN THE SOFTWARE.
////////////////////////////////////////////////////////////////////////////////////////////////////

#pragma once
#ifndef textreader_h__
#define textreader_h__

#include "iosystem/streamreader.h"
#include "helper/array.h"
#include "helper/string.h"

namespace IO
{
	////////////////////////////////////////////////////////////////////////////////////////////////////
	/// \class	TextReader
	///
	/// \brief	This is just a simple TextReader.
	///
	/// \author	Markus
	/// \date	13.02.2010
	////////////////////////////////////////////////////////////////////////////////////////////////////
	class TextReader : public StreamReader
	{
		RE_DeclareClass(TextReader);

	public:

		////////////////////////////////////////////////////////////////////////////////////////////////////
		/// \fn	TextReader()
		///
		/// \brief	Default constructor. 
		///
		/// \author	Markus
		/// \date	13.02.2010
		////////////////////////////////////////////////////////////////////////////////////////////////////
		TextReader();

		////////////////////////////////////////////////////////////////////////////////////////////////////
		/// \fn	virtual ~TextReader()
		///
		/// \brief	Finaliser. 
		///
		/// \author	Markus
		/// \date	13.02.2010
		////////////////////////////////////////////////////////////////////////////////////////////////////
		virtual ~TextReader();




		////////////////////////////////////////////////////////////////////////////////////////////////////
		/// \fn	uchar ReadChar()
		///
		/// \brief	Reads just one char from the stream.
		///
		/// \author	Markus
		/// \date	13.02.2010
		///
		/// \return	Just a char from the Stream.
		////////////////////////////////////////////////////////////////////////////////////////////////////
		uchar ReadChar();

		////////////////////////////////////////////////////////////////////////////////////////////////////
		/// \fn	Helper::String ReadLine()
		///
		/// \brief	Reads a whole line from within the stream.
		///
		/// \author	Markus
		/// \date	13.02.2010
		///
		/// \return	Just one line from the Stream.
		////////////////////////////////////////////////////////////////////////////////////////////////////
		Helper::String ReadLine();

		////////////////////////////////////////////////////////////////////////////////////////////////////
		/// \fn	Helper::Array<Helper::String> ReadAllLines()
		///
		/// \brief	Reads all lines of the stream.
		///
		/// \author	Markus
		/// \date	13.02.2010
		///
		/// \return	A String Array containing all remaining lines of the Stream.
		////////////////////////////////////////////////////////////////////////////////////////////////////
		Helper::Array<Helper::String> ReadAllLines();

	protected:

	private:

	};

}

#endif // textreader_h__